mod master;
use axum::{
    middleware, routing::{ get, put }, Router
};

pub fn auth_routes() -> Router{
    Router::new()
    .route("/",      get(master::list).post(master::save).put(master::save)
    )
    .route("/{id}",get(master::find).delete(master::del))
    .route("/disabled", put(master::disabled))
    .route_layer(middleware::from_fn(com::perm::admin::auth))
    .route("/dict", get(master::dict))
    .route("/list", get(master::data))
}